#ifndef _BIT_MAP_
#define _BIT_MAP_
#include "server.h"
#define BITMAP_SIZE 1024  // 需要表示的位数
#define WORD_SIZE (sizeof(uint32_t) * 8)
#define ARRAY_SIZE ((BITMAP_SIZE + WORD_SIZE - 1) / WORD_SIZE)
#define TIMEOUT 30

typedef struct timing_wheel_s {
    int cur;
    uint32_t bitmap[TIMEOUT][ARRAY_SIZE];
}timing_wheel_t;
//设某位为1
void set_bit(uint32_t *bitmap, int pos);

//设某位为0
void clear_bit(uint32_t *bitmap, int pos);

//
void find_set_bits_fast(uint32_t bitmap[][ARRAY_SIZE], int epfd,int cur);
#endif
